Sum (fld), Sum (fld, fld), Sum (fld, condFld), Sum (fld, condFld, cond), Sum (x)

Basic and Crystal syntax.

Arguments
Returns

Fractional Number

Action

Enables you to add the values that appear in your report. For example:

Examples

The following examples are applicable to both Basic and Crystal syntax:

Sum({file.QTY})

Calculates the sum of all values in the QTY field.

Sum({orders.ORDER ID}, {orders.CUSTOMER ID})

Sums (totals) the orders in each group of orders in the Amount field. The orders are separated into groups whenever the value in the Customer ID field changes.

Sum({orders.AMOUNT}, {orders.DATE}, "monthly") % Sum({orders.AMOUNT })

Groups values in the Amount field by month, and calculates the sum of the values for each month group as a percentage of the sum of the values for the entire report.

Sum([{file.AMOUNT}, {file.PRICE}, {file.COST}])

Sum of values in the Amount, Price, and Cost fields.

Note:    Using this function in a formula forces the formula to be evaluated at print time. For more information on evaluation time considerations, see the Evaluation Time functions.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com